<script setup>
	import {
		onLaunch,
		onHide
	} from '@dcloudio/uni-app'
	import {
		useUserStore
	} from './store/user'



	const userStore = useUserStore()





	onLaunch(() => {
		const token = uni.getStorageSync('user_token');
		if (token) {

			userStore.getUserInfo()
			uni.switchTab({
				url: '/pages/home/home'
			})
		} else {
			uni.navigateTo({
				url: '/pages/landingPage/landingPage'
			})
		}
	})
</script>

<style lang="scss">
	/* 注意要写在第一行，注意不能引入至uni.scss，同时给style标签加入lang="scss"属性 */
	@import "@/uni_modules/uview-plus/index.scss";
</style>